#!/usr/bin/python3

import os, sys, math, copy

def main():
    x = 500
    n = 1
    fmt = "{1:5d}: x = {0:30.20g} y = {2:30.20g}; x / y = {3:15.10f}"
    while x >= 0 and n < 1010:
        print(fmt.format(x, n, 2**(n - 1), x / (2**(n - 1))))
        x = 2 * (x - 2**(n - 1))
        n += 1
    print(fmt.format(x, n, 2**(n - 1), x / (2**(n - 1))))

if __name__ == "__main__":
    main()
